package com.cc.entity;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

public class Book implements Serializable {


    @Serial
    private static final long serialVersionUID = 5134639413696544190L;
    private int id;
    //书名
    private String book_name;
    //作者
    private String author;
    //出版时间
    private Date publicationdate;
    //价格
    private int price;
    //类别ID(外键关联书籍类型表)
    private int category_id;

    private Book_category book_category;

    public Book_category getBook_category() {
        return book_category;
    }

    public void setBook_category(Book_category book_category) {
        this.book_category = book_category;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getBook_name() {
        return book_name;
    }

    public void setBook_name(String book_name) {
        this.book_name = book_name;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public Date getPublicationdate() {
        return publicationdate;
    }

    public void setPublicationdate(Date publicationdate) {
        this.publicationdate = publicationdate;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public int getCategory_id() {
        return category_id;
    }

    public void setCategory_id(int category_id) {
        this.category_id = category_id;
    }

    @Override
    public String toString() {
        return "Book{" +
                "id=" + id +
                ", book_name='" + book_name + '\'' +
                ", author='" + author + '\'' +
                ", publicationdate=" + publicationdate +
                ", price=" + price +
                ", category_id=" + category_id +
                '}';
    }
}
